<?php
/**
 * CompleXml Framework
 *
 * @category   CompleXml
 * @package    CompleXml_Handler
 * @copyright  Copyright (c) 2008 Andrey Kucherenko
 * @license    New BSD License
 * @version    $Id: Actions.php 8 2008-11-13 14:50:42Z kucherenko.andrey $
 */

require_once 'CompleXml/Handler/Listener/Abstract.php';
class CompleXml_Handler_Listener_Actions extends CompleXml_Handler_Listener_Abstract
{
    public function execute (CompleXml_Object_Abstract $Object)
    {
        $action = $Object->Request->getString('action');
        if (! is_null($action) && method_exists($Object, 'on' . $action)) {
            $Object->addAction('on' . $action);
        }
    }
}